package org.momo.rpc.annotion;

import org.momo.rpc.constant.RateLimitKey;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;


@Target({ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
public @interface RateLimit {

    RateLimitKey type();

    // fixed/sliding window
    int interval() default 100;

    int permitPerInterval() default 100;

    // token
    int capacity() default 100;

    int rate() default 100;

}
